//
//  ReadDetialCell.m
//  A Cup
//
//  Created by dllo on 15/4/22.
//  Copyright (c) 2015年 doll. All rights reserved.
//

#import "ReadDetialCell.h"

@implementation ReadDetialCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        //文章标题
        self.titleLabel = [[UILabel alloc] init];
        [self.contentView addSubview:self.titleLabel];
         self.titleLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:16];
        [_titleLabel release];
        //文章简介
        self.contentLabel = [[UILabel alloc] init];
        [self.contentView addSubview:self.contentLabel];
        self.contentLabel.font = [UIFont systemFontOfSize: 13];
        self.contentLabel.numberOfLines = 0;
        [self.contentLabel sizeToFit];
        [_contentLabel release];
        //文章图片
        self.readimage = [[UIImageView alloc] init];
        [self.contentView addSubview:self.readimage];
        [_readimage release];
    }
    return self;
}

- (void)dealloc
{
    [_titleLabel release];
    [_contentLabel release];
    [_readimage release];
    [super dealloc];
}


- (void)layoutSubviews
{
    [super layoutSubviews];
    self.titleLabel.frame = CGRectMake(15, 10, self.contentView.frame.size.width - 30, 20);
    self.readimage.frame = CGRectMake(15, 40, 120, 70);
    self.contentLabel.frame = CGRectMake(140, 40, self.contentView.frame.size.width - 140 - 15, 70);
}

- (void)awakeFromNib {
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

}

@end
